Skip to content

chore(release): 4.0.1#210

Open
M-Elsaeed wants to merge 2 commits into
aws:mainfrom
M-Elsaeed:release/4.0.1
Open

chore(release): 4.0.1#210
M-Elsaeed wants to merge 2 commits into
aws:mainfrom
M-Elsaeed:release/4.0.1

Conversation

@M-Elsaeed

@M-Elsaeed M-Elsaeed commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Release 4.0.1 of the AWS Lambda Python Runtime Interface Client, plus release automation.

Bumps the version from 4.0.0 to 4.0.1, adds the changelog entry, and adds a workflow to auto-create GitHub Releases on future version bumps.

Release content

Changes

  • awslambdaric/__init__.py: __version__ 4.0.0 → 4.0.1
  • RELEASE.CHANGELOG.md: added 4.0.1 entry
  • .github/workflows/release-on-version-change.yml: new workflow that, on push to main touching awslambdaric/__init__.py, creates a tag + GitHub Release (titled AWS Lambda Runtime Interface Client for Python v<version>) with notes pulled from the matching RELEASE.CHANGELOG.md section. Skips if a release for that version already exists.

Notes

Testing

Bump version to 4.0.1 and update changelog for the Alpine Linux 3.17+
(musl) build fix (aws#204).
Adds a workflow that detects a change to __version__ in
awslambdaric/__init__.py on main, then creates a tag and GitHub Release
using notes from RELEASE.CHANGELOG.md. Skips if the release already exists.
- name: Read version
id: version
run: |
VERSION="$(grep -Po '__version__\s*=\s*"\K[^"]+' awslambdaric/__init__.py)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use sed/aws instead (-Po is not posix)

id: check
env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ steps.version.outputs.version }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the release check lives with reading the version and no need for a separate step for it and we could drop the extra check if version exists or not

VERSION: ${{ steps.version.outputs.version }}
run: |
if gh release view "$VERSION" >/dev/null 2>&1; then
echo "exists=true" >> "$GITHUB_OUTPUT"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Nit-pick): I'd rename it to (release_exists or something like that)

# Trim leading/trailing blank lines.
sed -i -e '/./,$!d' release-notes.md
if [ ! -s release-notes.md ]; then
echo "Release $VERSION" > release-notes.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a version bump always means something changed, having the release body be just the version number isn't useful. I'd prefer the workflow to fail here, forcing the contributor to add a changelog entry before the release is created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants